1.ajax内
const iaUaeMock = env.glIsUseMock;
const {mockDataPrefix,prefix1} = env.ajaxPrefixUrl;

let ajaxConfig={
    getAjax(data){
        if(store.state.isLogin){
            if(isUseMock){
                return network.get(
                    `${mockDataPrefix}url.json`
                )
            }else{
                return network.get(
                    `${prefix1}url.json`
                )
            }
        }
    }
}

2.env.js
let glIsUseMock = false;
if(ProcessingInstruction.env.NODE_ENV == 'development'){
    if(ProcessingInstruction.env.VUE_APP_ENV_CONFIG == 'mock'){
        glIsUseMock = true;
    }
}